import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home.vue'
import Login from '@/views/login.vue'
import Cgcourse from '@/views/cgcourse.vue'
import Course from '@/views/course.vue'
import Infor from '@/views/infor.vue'
import Gradelis from '@/views/gradelis.vue'
import Cginfor from '@/views/cginfor.vue'

const routes = [
  {
    path:'/cginfor',
    name: 'cginfor',
    component:Cginfor
  },
  {
    path:'/gradelis',
    name: 'gradelis',
    component:Gradelis
  },
  {
    path: '/infor',
    name: 'infor',
    component:Infor
  },
  {
    path: '/course',
    name: 'course',
    component:Course
  },
  {
    path: '/cgcourse',
    name: 'cgcourse',
    component:Cgcourse
  },
  {
    path:'/home',
    name: 'home',
    component:Home
  },
  {
    path:'/',
    name: 'login',
    component:Login
  }
]

const router = createRouter({
  routes,
  history: createWebHistory(),
  scrollBehavior() {
    return { top: 0 }
  }
})

export default router
